<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>我的下载</title>
<link href="$!{__beat.server.contextPath}/css/css.css" rel="stylesheet" type="text/css" />

<link rel="stylesheet" href="$!{__beat.server.contextPath}/css/theme/font-awesome.min.css" type="text/css" />		
<link rel="stylesheet" href="$!{__beat.server.contextPath}/css/theme/bootstrap.min.css" type="text/css" />	
<link rel="stylesheet" href="$!{__beat.server.contextPath}/javascript/theme/libs/css/ui-lightness/jquery-ui-1.9.2.custom.css" type="text/css" />		
<link rel="stylesheet" href="$!{__beat.server.contextPath}/css/theme/App.css" type="text/css" />
<link rel="stylesheet" href="$!{__beat.server.contextPath}/css/theme/custom.css" type="text/css" />
<script src="$!{__beat.server.contextPath}/javascript/theme/libs/jquery-1.9.1.min.js"></script>
<script src="$!{__beat.server.contextPath}/javascript/theme/libs/jquery-ui-1.9.2.custom.min.js"></script>
<script src="$!{__beat.server.contextPath}/javascript/theme/libs/bootstrap.min.js"></script>
<script src="$!{__beat.server.contextPath}/javascript/theme/App.js"></script>

<script >
			$(function(){$("#clear").click(function(){ 
					$("#subName").val("");
					$("#reportName").val("");
                })
             })
			 
			 function updateState(id,upstate){
			 	jQuery.ajax({
        			url:"/submailmanager/changestate",
            		type:"post",
            		async:true,
            		data:{"upstate":upstate,"id":id},
            		success:function(data){
                		if(data == "error"){
							alert("更新失败！");
						}else if(data == "success"){
							alert("更新成功！");
							document.searchUser.submit();
						}
            		}
            	});
			 }
		 
</script>

</head>
<body>
<div id="content" style="OVERFLOW-X:yes;OVERFLOW-Y:auto">		
			
	<div id="content-container">
			<div class="portlet">
							<div class="portlet-header">
    
    							<h3>
    								<i class="fa fa-hand-o-up"></i>
    								下载列表
    							</h3>
    							<input type='hidden' id='curPage' #if($pageIndex) value="$pageIndex" #else value="0" #end/>
    						</div> <!-- /.portlet-header -->
    
							
							
    						<div class="portlet-content">						
    							<div class="table-responsive">
    
									<!--table begin -->
        							<table 
        								class="table table-striped table-bordered table-hover" 
        								data-provide="datatable" 
        								data-display-rows="20"
        							>
        									<thead>
        										<tr>
                                                    <th>报表名 </th>
													<th>数据文件名 </th>
													<th>下载完成时间 </th>
													<th>文件过期时间</th>
													<th>下载状态</th>
        										</tr>
        									</thead>
        									<tbody>
												 #foreach($vo in $rsList)
                                            		<tr>
                                            		   <td>$vo.reportName</td>
                                                       <td>$vo.subName</td>
                                                       <td>
                                                        #if($vo.modTime)
                                                           $vo.modTime
                                                        #end 
                                                       </td>
                                                	   <td style="color:red"> 
                                                        #if($vo.compTime)
                                                           $vo.compTime
                                                        #end 
                                                        </td>
                                                       <td>
                                            			#if($vo.state == 3)
                                            				<a style="color:green" href="/zipfiles/$!{vo.id}$!{vo.userId}$!{vo.reportId}.zip">已完成，点此下载。</a>
                                            			#elseif($vo.state == 1)
                                            				<span style="color:blue" >未完成</span>
                                            			#else
                                            				已下线
                                            			#end
                                            		   </td>
                                                    </tr>	
                                        		#end
												
        									</tbody>
        								
        							</table>
        							<!--table end -->
										
    								<!--paginate begin -->
    								<div class="row dt-rb">
    									#parse("/views/default/newpage.vm")
										#pagenew($subMailList "/userdownmanager?#page#&$paramurl")
                                    </div>
    								<!--paginate end -->
    								
									
                                </div>
							</div> <!-- /#portlet-content -->
								
							 
								
    						</div> 
		
		
	</div> <!-- /#content-container -->
	
</div> <!-- #content -->
	

</body>
</html>